Integrand size = 45, antiderivative size = 189 \[ \int \frac {\left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sqrt {\sec (c+d x)}}{(a+a \cos (c+d x))^{3/2}} \, dx=\frac {2 C \arcsin \left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {a+a \cos (c+d x)}}\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}}{a^{3/2} d}+\frac {(3 A+B-5 C) \arctan \left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {2} \sqrt {\cos (c+d x)} \sqrt {a+a \cos (c+d x)}}\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}}{2 \sqrt {2} a^{3/2} d}-\frac {(A-B+C) \sin (c+d x)}{2 d (a+a \cos (c+d x))^{3/2} \sqrt {\sec (c+d x)}} \]
[Out]
Time = 0.85 (sec) , antiderivative size = 189, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.156, Rules used = {4306, 3120, 3061, 2861, 211, 2853, 222} \[ \int \frac {\left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sqrt {\sec (c+d x)}}{(a+a \cos (c+d x))^{3/2}} \, dx=\frac {(3 A+B-5 C) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} \arctan \left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {2} \sqrt {\cos (c+d x)} \sqrt {a \cos (c+d x)+a}}\right )}{2 \sqrt {2} a^{3/2} d}+\frac {2 C \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} \arcsin \left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {a \cos (c+d x)+a}}\right )}{a^{3/2} d}-\frac {(A-B+C) \sin (c+d x)}{2 d \sqrt {\sec (c+d x)} (a \cos (c+d x)+a)^{3/2}} \]
[In]
[Out]
Rule 211
Rule 222
Rule 2853
Rule 2861
Rule 3061
Rule 3120
Rule 4306
Rubi steps \begin{align*} \text {integral}& = \left (\sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {A+B \cos (c+d x)+C \cos ^2(c+d x)}{\sqrt {\cos (c+d x)} (a+a \cos (c+d x))^{3/2}} \, dx \\ & = -\frac {(A-B+C) \sin (c+d x)}{2 d (a+a \cos (c+d x))^{3/2} \sqrt {\sec (c+d x)}}+\frac {\left (\sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {\frac {1}{2} a (3 A+B-C)+2 a C \cos (c+d x)}{\sqrt {\cos (c+d x)} \sqrt {a+a \cos (c+d x)}} \, dx}{2 a^2} \\ & = -\frac {(A-B+C) \sin (c+d x)}{2 d (a+a \cos (c+d x))^{3/2} \sqrt {\sec (c+d x)}}+\frac {\left ((3 A+B-5 C) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {1}{\sqrt {\cos (c+d x)} \sqrt {a+a \cos (c+d x)}} \, dx}{4 a}+\frac {\left (C \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {\sqrt {a+a \cos (c+d x)}}{\sqrt {\cos (c+d x)}} \, dx}{a^2} \\ & = -\frac {(A-B+C) \sin (c+d x)}{2 d (a+a \cos (c+d x))^{3/2} \sqrt {\sec (c+d x)}}-\frac {\left ((3 A+B-5 C) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \text {Subst}\left (\int \frac {1}{2 a^2+a x^2} \, dx,x,-\frac {a \sin (c+d x)}{\sqrt {\cos (c+d x)} \sqrt {a+a \cos (c+d x)}}\right )}{2 d}-\frac {\left (2 C \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {1-\frac {x^2}{a}}} \, dx,x,-\frac {a \sin (c+d x)}{\sqrt {a+a \cos (c+d x)}}\right )}{a^2 d} \\ & = \frac {2 C \arcsin \left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {a+a \cos (c+d x)}}\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}}{a^{3/2} d}+\frac {(3 A+B-5 C) \arctan \left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {2} \sqrt {\cos (c+d x)} \sqrt {a+a \cos (c+d x)}}\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}}{2 \sqrt {2} a^{3/2} d}-\frac {(A-B+C) \sin (c+d x)}{2 d (a+a \cos (c+d x))^{3/2} \sqrt {\sec (c+d x)}} \\ \end{align*}
Time = 3.28 (sec) , antiderivative size = 171, normalized size of antiderivative = 0.90 \[ \int \frac {\left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sqrt {\sec (c+d x)}}{(a+a \cos (c+d x))^{3/2}} \, dx=\frac {\cos ^2\left (\frac {1}{2} (c+d x)\right ) \left (\frac {\left ((3 A+B-5 C) \arcsin \left (\tan \left (\frac {1}{2} (c+d x)\right )\right )+4 \sqrt {2} C \arctan \left (\frac {\tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {\frac {\cos (c+d x)}{1+\cos (c+d x)}}}\right )\right ) \sqrt {\frac {\cos (c+d x)}{1+\cos (c+d x)}} \sqrt {1+\sec (c+d x)}}{\sqrt {\sec ^2\left (\frac {1}{2} (c+d x)\right )}}-\frac {(A-B+C) \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {\sec (c+d x)}}\right )}{d (a (1+\cos (c+d x)))^{3/2}} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(360\) vs. \(2(156)=312\).
Time = 2.10 (sec) , antiderivative size = 361, normalized size of antiderivative = 1.91
method | result | size |
default | \(-\frac {\sqrt {2}\, \left (A \sqrt {2}\, \sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )-B \sqrt {2}\, \sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )-4 C \sqrt {2}\, \arctan \left (\sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \tan \left (d x +c \right )\right ) \cos \left (d x +c \right )+C \sqrt {2}\, \sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )+3 A \arcsin \left (\cot \left (d x +c \right )-\csc \left (d x +c \right )\right ) \cos \left (d x +c \right )+B \arcsin \left (\cot \left (d x +c \right )-\csc \left (d x +c \right )\right ) \cos \left (d x +c \right )-4 C \sqrt {2}\, \arctan \left (\sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \tan \left (d x +c \right )\right )-5 C \arcsin \left (\cot \left (d x +c \right )-\csc \left (d x +c \right )\right ) \cos \left (d x +c \right )+3 A \arcsin \left (\cot \left (d x +c \right )-\csc \left (d x +c \right )\right )+B \arcsin \left (\cot \left (d x +c \right )-\csc \left (d x +c \right )\right )-5 C \arcsin \left (\cot \left (d x +c \right )-\csc \left (d x +c \right )\right )\right ) \sqrt {\left (1+\cos \left (d x +c \right )\right ) a}\, \left (\sqrt {\sec }\left (d x +c \right )\right ) \cos \left (d x +c \right )}{4 a^{2} d \left (1+\cos \left (d x +c \right )\right )^{2} \sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}}\) | \(361\) |
parts | \(-\frac {A \sqrt {2}\, \left (\sqrt {2}\, \sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )+3 \arcsin \left (\cot \left (d x +c \right )-\csc \left (d x +c \right )\right ) \cos \left (d x +c \right )+3 \arcsin \left (\cot \left (d x +c \right )-\csc \left (d x +c \right )\right )\right ) \sqrt {\left (1+\cos \left (d x +c \right )\right ) a}\, \left (\sqrt {\sec }\left (d x +c \right )\right ) \cos \left (d x +c \right )}{4 d \,a^{2} \left (1+\cos \left (d x +c \right )\right )^{2} \sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}}+\frac {B \sqrt {2}\, \left (\sqrt {2}\, \sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )-\arcsin \left (\cot \left (d x +c \right )-\csc \left (d x +c \right )\right ) \cos \left (d x +c \right )-\arcsin \left (\cot \left (d x +c \right )-\csc \left (d x +c \right )\right )\right ) \sqrt {\left (1+\cos \left (d x +c \right )\right ) a}\, \left (\sqrt {\sec }\left (d x +c \right )\right ) \cos \left (d x +c \right )}{4 d \,a^{2} \left (1+\cos \left (d x +c \right )\right )^{2} \sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}}-\frac {C \sqrt {2}\, \left (\sqrt {2}\, \sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )-4 \sqrt {2}\, \arctan \left (\sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \tan \left (d x +c \right )\right ) \cos \left (d x +c \right )-5 \arcsin \left (\cot \left (d x +c \right )-\csc \left (d x +c \right )\right ) \cos \left (d x +c \right )-4 \sqrt {2}\, \arctan \left (\sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \tan \left (d x +c \right )\right )-5 \arcsin \left (\cot \left (d x +c \right )-\csc \left (d x +c \right )\right )\right ) \left (\sqrt {\sec }\left (d x +c \right )\right ) \sqrt {\left (1+\cos \left (d x +c \right )\right ) a}\, \cos \left (d x +c \right )}{4 d \,a^{2} \left (1+\cos \left (d x +c \right )\right )^{2} \sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}}\) | \(489\) |
[In]
[Out]
none
Time = 17.13 (sec) , antiderivative size = 213, normalized size of antiderivative = 1.13 \[ \int \frac {\left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sqrt {\sec (c+d x)}}{(a+a \cos (c+d x))^{3/2}} \, dx=-\frac {\sqrt {2} {\left ({\left (3 \, A + B - 5 \, C\right )} \cos \left (d x + c\right )^{2} + 2 \, {\left (3 \, A + B - 5 \, C\right )} \cos \left (d x + c\right ) + 3 \, A + B - 5 \, C\right )} \sqrt {a} \arctan \left (\frac {\sqrt {2} \sqrt {a \cos \left (d x + c\right ) + a} \sqrt {\cos \left (d x + c\right )}}{\sqrt {a} \sin \left (d x + c\right )}\right ) + 2 \, \sqrt {a \cos \left (d x + c\right ) + a} {\left (A - B + C\right )} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right ) + 8 \, {\left (C \cos \left (d x + c\right )^{2} + 2 \, C \cos \left (d x + c\right ) + C\right )} \sqrt {a} \arctan \left (\frac {\sqrt {a \cos \left (d x + c\right ) + a} \sqrt {\cos \left (d x + c\right )}}{\sqrt {a} \sin \left (d x + c\right )}\right )}{4 \, {\left (a^{2} d \cos \left (d x + c\right )^{2} + 2 \, a^{2} d \cos \left (d x + c\right ) + a^{2} d\right )}} \]
[In]
[Out]
\[ \int \frac {\left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sqrt {\sec (c+d x)}}{(a+a \cos (c+d x))^{3/2}} \, dx=\int \frac {\left (A + B \cos {\left (c + d x \right )} + C \cos ^{2}{\left (c + d x \right )}\right ) \sqrt {\sec {\left (c + d x \right )}}}{\left (a \left (\cos {\left (c + d x \right )} + 1\right )\right )^{\frac {3}{2}}}\, dx \]
[In]
[Out]
\[ \int \frac {\left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sqrt {\sec (c+d x)}}{(a+a \cos (c+d x))^{3/2}} \, dx=\int { \frac {{\left (C \cos \left (d x + c\right )^{2} + B \cos \left (d x + c\right ) + A\right )} \sqrt {\sec \left (d x + c\right )}}{{\left (a \cos \left (d x + c\right ) + a\right )}^{\frac {3}{2}}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {\left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sqrt {\sec (c+d x)}}{(a+a \cos (c+d x))^{3/2}} \, dx=\text {Timed out} \]
[In]
[Out]
Timed out. \[ \int \frac {\left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sqrt {\sec (c+d x)}}{(a+a \cos (c+d x))^{3/2}} \, dx=\int \frac {\sqrt {\frac {1}{\cos \left (c+d\,x\right )}}\,\left (C\,{\cos \left (c+d\,x\right )}^2+B\,\cos \left (c+d\,x\right )+A\right )}{{\left (a+a\,\cos \left (c+d\,x\right )\right )}^{3/2}} \,d x \]
[In]
[Out]